package com.nchu.chatserver.dao;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 王小航
 * @Date: 2025/05/07/22:11
 * @Description:
 */
@Data
public class MessageDTO {
    private Integer id; // 消息ID（可选）

    @NotNull(message = "发送者ID不能为空")
    private Integer senderId;

    @NotNull(message = "接收者ID不能为空")
    private Integer receiverId;

    @NotBlank(message = "消息内容不能为空")
    private String content;

    private LocalDateTime createTime; // 可选，可由服务端自动生成

    private Boolean isRead;


}